/**
 * 
 */
package club325.webchat.database.hibernate.dao;

import java.sql.Timestamp;
import java.util.List;

import javax.servlet.ServletException;

import club325.webchat.database.hibernate.domain.VisitorStatistics;

/**
 * @author Sider
 *
 */
public interface VisitorStatisticsDAO
{
	/**
	 * insert a information that a visitor come
	 * @param visit
	 */
	public void VisitorGet(VisitorStatistics visit);
	
	/**
	 * save the information that a visitor leave
	 * @param visit
	 * @throws ServletException 
	 */
	public void VisitorLeave(VisitorStatistics visit) throws ServletException;
	
	/**
	 * get the number of all the IP of the visitors
	 * @return
	 */
	public int getIPCount();
	
	/**
	 * get the number of the IP of the visitors who visit the web between starttime and endtime
	 * @param starttime
	 * @param endtime
	 * @return
	 * @throws ServletException 
	 */
	public int getIPCount(Timestamp starttime,Timestamp endtime) throws ServletException;
	
	/**
	 * get the list of the time when visitor arrive at the website
	 * @param starttime
	 * @param endstamp
	 * @return
	 * @throws ServletException 
	 */
	public List<VisitorStatistics> getVisitorVisitList(Timestamp starttime,Timestamp endtime) throws ServletException;
	
	/**
	 * get the list of the time when visitor leave the website
	 * @param starttime
	 * @param endtime
	 * @return
	 * @throws ServletException 
	 */
	public List<VisitorStatistics> getVisitorLeaveList(Timestamp starttime,Timestamp endtime) throws ServletException;
}
